import time

from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.firefox.options import Options
if __name__ == '__main__':
    exe_path = "../driver/geckodriver.exe"
    service = Service(executable_path=exe_path)

    options = Options()
    options.binary_location = r"C:\Program Files\Mozilla Firefox\firefox.exe"

    brower = webdriver.Firefox(options=options, service=service)

    # 设置窗口最大化显示
    # brower.maximize_window()
    brower.get(url="https://www.baidu.com")

    brower.set_window_position(800, 600)
    # 睡眠 10 秒
    time.sleep(10)
    # 退出
    brower.quit()
